﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace Networking
{
	public class PlayerHitGameEvent : GameEvent
	{
        public int damageReceived = 0;

        public PlayerHitGameEvent(NetworkPlayer originator, NetworkPlayer target, int damageReceived)
            : base(originator, target, GameEventType.PlayerHit)
        {
            this.damageReceived = damageReceived;
        }

        public PlayerHitGameEvent(BitStream stream)
            : base(GameEventType.PlayerHit, stream)
        {
            stream.Serialize(ref damageReceived);
        }

        protected override void SerializeEventData(BitStream stream)
        {
            stream.Serialize(ref damageReceived);
        }
    }
}
